package com.best.main;

import com.best.aop.Calculator;
import com.best.config.AppConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Jiang Akang
 * employeeId: BG435424
 * @date 2021/5/29
 **/

public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
        Calculator calculator = (Calculator) applicationContext.getBean("calculator");
        System.out.println("*********调用业务逻辑**********");
        calculator.add(1, 2);
    }
}
